﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    xmlns:Fluent="clr-namespace:Fluent"
                    mc:Ignorable="d">

    <Style x:Key="MenuSeparatorStyle"
           TargetType="{x:Type Separator}">
        <Setter Property="Template"
                Value="{DynamicResource MenuSeparatorControlTemplate}" />
    </Style>
    <Style x:Key="{x:Static MenuItem.SeparatorStyleKey}"
           TargetType="{x:Type Separator}">
        <Setter Property="Template"
                Value="{DynamicResource MenuSeparatorControlTemplate}" />
    </Style>
    <ControlTemplate x:Key="MenuSeparatorControlTemplate"
                     TargetType="{x:Type Separator}">
        <Grid Height="Auto">
            <Path Fill="{x:Null}"
                  Stretch="Fill"
                  Stroke="{DynamicResource ContextMenuSeparatorBrush}"
                  Margin="32,1,3,2"
                  VerticalAlignment="Center"
                  Height="1"
                  Data="M0,0L1,0" />
        </Grid>
    </ControlTemplate>
    <Style x:Key="MenuGroupSeparatorStyle"
           TargetType="{x:Type Fluent:GroupSeparatorMenuItem}">
        <Setter Property="Template"
                Value="{DynamicResource MenuGroupSeparatorControlTemplate}" />
        <Setter Property="Foreground"
                Value="{DynamicResource DefaultFontBrush}" />
    </Style>
    <ControlTemplate x:Key="MenuGroupSeparatorControlTemplate"
                     TargetType="{x:Type Fluent:GroupSeparatorMenuItem}">
        <Grid Height="24"
              Background="#FFEEEEEE">
            <TextBlock Margin="7,0"
                       Text="{TemplateBinding Header}"
                       TextWrapping="Wrap"
                       d:LayoutOverrides="Width, Height"
                       VerticalAlignment="Center"
                       HorizontalAlignment="Left"
                       FontWeight="Bold" />
        </Grid>
    </ControlTemplate>
    <Style x:Key="{x:Type Fluent:GroupSeparatorMenuItem}"
           TargetType="{x:Type Fluent:GroupSeparatorMenuItem}"
           BasedOn="{StaticResource MenuGroupSeparatorStyle}" />
</ResourceDictionary>